﻿package air.screens
{
    import library.ASTUce.framework.TestCase;
    
    public class ScreenDensityTest extends TestCase
    {
        public function ScreenDensityTest( name:String = "" )
        {
            super( name );
        }
        
        public function testGetPreferredDensity():void
        {
            assertEquals( ScreenDensity.nodpi, ScreenDensity.getPreferredDensity( -100 ) );
            assertEquals( ScreenDensity.nodpi, ScreenDensity.getPreferredDensity(    0 ) );
            assertEquals( ScreenDensity.ldpi, ScreenDensity.getPreferredDensity(  100 ) );
            assertEquals( ScreenDensity.mdpi, ScreenDensity.getPreferredDensity(  150 ) );
            assertEquals( ScreenDensity.hdpi, ScreenDensity.getPreferredDensity(  200 ) );
            assertEquals( ScreenDensity.hdpi, ScreenDensity.getPreferredDensity(  250 ) );
            assertEquals( ScreenDensity.xhdpi, ScreenDensity.getPreferredDensity(  300 ) );
            assertEquals( ScreenDensity.xxdpi, ScreenDensity.getPreferredDensity(  350 ) );
            assertEquals( ScreenDensity.xxxdpi, ScreenDensity.getPreferredDensity(  500 ) );
        }
    }
}